import java.util.Random;

public class Mppx {
    public static void main(String[] args) {
        Random in =new Random();
        int[]a=new int[10];
        for (int i = 0; i <10; i++) {
            a[i]=in.nextInt(100);
        }
        int min=a[0],max=a[0];
        for (int i=0;i<a.length;i++){
            if(a[i]<min)min=a[i];
            if(a[i]>max)max=a[i];
        }
        System.out.println("最小的值是："+min);
        System.out.println("最大的值是："+max);

        for(int i=1;i<a.length;i++) {
            for (int j=0;j<a.length-i;j++){
                if(a[j]<a[j+1]){
                    int temp=a[j];
                    a[j]=a[j+1];
                    a[j+1]=temp;
                }
            }
        }
        for (int i=0;i<a.length;i++){
            if(i==a.length-1){
                System.out.println(a[i]+"。");
                break;
            }
            System.out.print(a[i]+",");
        }
    }
}
